// 用户相关接口
import {http} from '@/utils';
// 获取文章类型
export function getChannels (parms) {
 return   http.get('/channels')
}

// 发布文章
export function getArticles (params,id) {
 return id ? http.put(`/mp/articles/${id}?draft=false`, params) :
 http.post('/mp/articles?draft=false', params)
 }

//  获取文章列表
export function getArticlesList (params) {
    console.log(params);
    
    return http.get('/mp/articles',{params})
    }
//  删除
export function getDeleteArticles (params) {
    console.log(params);
    
    return  http.delete(`/mp/articles/${params}`)

    }
// 获取文章详情
export function getArticlesDetail (params) {
    console.log(params);
    
 return   http.get(`/mp/articles/${params}`)

    }
